import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;

public class Line {
	 private Point3d p1, p2;
	 private Vector3d versor = new Vector3d();
	 
	 public Line(Point3d p1, Point3d p2){
		 this.p1 = p1;
		 this.p2 = p2;
		 versor.sub(this.p2,this.p1);
		 versor.normalize();
	 }
	 public Point3d getPointA(){
		 return p1;
	 }
	 public Point3d getPointB(){
		 return p2;
	 }
	 public Vector3d getVersor(){
		 return versor;
	 }
	 public String toString(){
		 return "Line info:\n"+"\t p1 = " + p1.toString() + "\n\t p2 = " + p2.toString() + "\n\t versor = " + versor.toString();	 
	 }
	 
}
